/***************************************************
Class: EnvObject
Includes: stdafx.h, Mesh.h
Editors: Gindi
Existing Issues: None
Description: 
***************************************************/
#pragma once
#include "stdafx.h"
#include "Mesh.h"
#include "WorldObjectStates.h"

class EnvObject {
public: // public functions
	EnvObject() {}
	EnvObject(string mFile) { modelFile = mFile; }
	~EnvObject() { Release(); }
	void Release();
	bool Initialize(LPDIRECT3DDEVICE9 pDevice);
	bool InitializeMesh(LPDIRECT3DDEVICE9 pDevice);
	bool InitializeRuinMesh(LPDIRECT3DDEVICE9 pDevice);
	void Update(float elapsedTime);
	void Render(LPDIRECT3DDEVICE9 pDevice);

public: // public variables
	Mesh			mesh;			// mesh
	Mesh			meshRuin;		// ruin mesh
	MeshInstance	meshInst;		// mesh instance (has world transformation such as position, rotation, and scale)
	int				key;			// may make obsolete in the future
	int				value;			// the value of the object if destroyed (destroyer gains points)
	float			distToCam;
	float			health;
	float			maxHealth;
	bool			destructable;
	bool			diedOnce;
	string			alignment;		// "Player", "Ally", "Enemy", "Neutral"
	string			dataFile;		// data file of this object that stores its specific information (physics info, weapons, etc.)
	string			modelFile;		// model (.x) file for the object mesh
	string			name;			// name of the object (e.g. "Lancaster")
	string			ruinFile;

	WorldObjectState m_state;		// holds unit state info 
};
